
package com.shop.cloud.mall.api.controller;

import com.shop.cloud.common.core.util.R;
import com.shop.cloud.common.data.tenant.TenantContextHolder;
import com.shop.cloud.common.portal.annotation.ApiLogin;
import com.shop.cloud.mall.api.service.BalanceConfigService;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.*;
import io.swagger.v3.oas.annotations.tags.Tag;
import io.swagger.v3.oas.annotations.Operation;

/**
 * 余额功能配置
 *
 * @author
 * @date 2023-11-01 10:38:47
 */
@Slf4j
@RestController
@AllArgsConstructor
@RequestMapping("/balanceconfig")
@Tag(description = "balanceconfig", name = "余额功能配置API")
public class BalanceConfigController {

    private final BalanceConfigService balanceConfigService;

    /**
     * 余额功能配置查询
     * @return R
     */
    @Operation(summary = "余额功能配置查询")
    @GetMapping
    @ApiLogin
    public R get() {
        return R.ok(balanceConfigService.getByTenantId(TenantContextHolder.getTenantId()));
    }

}
